<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // Es6里面继承
        // class Father{
        //     //父类（超类） 
        // }
        // class Son extends Fanther{

        // }
        // // ES5 通过构造函数模拟类定义

        function Fanther(username,age){
            this.username = username;
            this.age =age;
        }
        // 子构造
        function Son(username,age,score){
            Fanther.call(this,username,age);
            this.scoer = score;
        }
        var s = new Son('百度',22,100);
        console.log(s);
    </script>
</body>
</html>